package com.woniu.humanresource.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

import lombok.Data;

/**
 * 
 * @TableName assetscategory
 */
@TableName(value ="assetscategory")
@Data
public class AssetsCategory implements Serializable {
    //资产类别表ID
    @TableId(value = "assetcategory_id", type = IdType.AUTO)
    private Integer id;

    //资产类别名称
    @TableField(value = "assetcategory_name")
    private String name;

    //上级类别ID
    @TableField(value = "assetcategory_parentid")
    private Integer parentid;

    //下级分类
    @TableField(exist = false)//表示当前属性不是数据库的字段，但在项目中必须使用。mybatis-plus就会忽略这个，不会报错
    private List<AssetsCategory> children;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}